feat: 落地 Agent 三面两线与会话工作目录 - #21
Merged
Merged
Conversation
- 在 `coordinator.go` 中实现了 Agent 状态的创建、会话标记、作业投递、步骤领取、状态加载、事实追加、步骤提交、取消请求和活跃恢复等功能。 - 删除了 `map.go` 文件,移除了不再使用的映射函数。 - 更新 `memory_index.go` 和 `worker.go`,优化了索引压缩和作业执行逻辑。 - 在 `persist.go` 中简化了数据库操作,移除了冗余的事件发布逻辑。 - 新增了测试文件 `fixture_test.go`,为 API 和运行时提供了基础测试框架。 相关功能尚待完善,包括数据库写入和事件发布的完整实现。后续将继续优化和扩展功能。
- 新增 `coordinator_test.go` 和 `runtime_more_test.go` 文件,包含对 Agent 状态管理功能的全面测试。 - 在 `coordinator.go` 中实现了 Agent 状态的创建、会话标记、步骤领取等功能,并优化了状态加载逻辑。 - 更新 `worker.go`,增强了作业执行和取消请求的处理。 - 在 `map.go` 中添加了数据库映射函数,简化了数据操作。 相关功能的测试用例确保了 Agent 的稳定性和可靠性,后续将继续扩展功能和测试覆盖率。
- 在 `index.ts` 中新增 `isRecoverableRun` 和 `RECOVERABLE_RUN_STATUSES`,以支持可恢复运行状态的管理。 - 在 `client.ts` 中实现 `getRun` 和 `continueRun` 方法,允许获取和继续运行。 - 更新 `types.ts`,定义 `Run` 接口及相关状态,增强类型安全。 - 在 `chat-page.tsx` 和 `session-sidebar.tsx` 中添加恢复按钮,提升用户交互体验。 - 在 `use-session-timeline.ts` 中实现恢复逻辑,支持自动检测可恢复的运行状态。 这些改进提升了系统的稳定性和用户体验,后续将继续优化相关功能。
- 修改 `package.json` 中的开发脚本,使用 `concurrently` 同时启动 API 和 Web 服务,提升开发效率。 - 在 `pnpm-lock.yaml` 中添加 `concurrently` 作为开发依赖,确保环境一致性。 - 更新 `README.md`,明确一条命令同时启动 API 和 Web 的使用说明。 - 在 `core` 包中新增审批相关功能,包括 `listApprovals` 和 `getApproval` 方法,增强审批管理。 - 在 `chat` 相关模块中添加审批处理逻辑,支持审批记录的应用与决策。 这些改进提升了开发体验和审批功能的可用性,后续将继续优化相关功能。
- 在 `conversation-timeline.tsx` 中实现用户消息的编辑功能,允许用户修改排队中的消息内容。 - 在 `router.go` 中新增 PATCH 路由以支持消息更新。 - 在 `message.go` 中实现 `UpdateMessage` 方法,处理消息内容的更新逻辑。 - 添加 `message_update_test.go` 测试文件,验证只有排队中的消息可以被编辑,并确保其他状态的消息编辑请求被拒绝。 - 更新数据库查询以支持消息内容的更新。 这些改进增强了用户交互体验,后续将继续优化消息管理功能。
- 在 `architecture.md` 中更新了关于同一会话的活动运行管理逻辑,确保在已有活动时返回 409 错误。 - 在 `core` 包中新增 `joinQueuedTexts` 函数,处理待发送文本的合并逻辑。 - 更新 `package.json` 中的测试脚本,添加对 `queue.test.ts` 的支持。 - 在 `chat` 模块中移除不再使用的 `updateMessage` 方法,简化代码。 - 新增 `queue.test.ts` 测试文件,验证 `joinQueuedTexts` 函数的正确性。 - 在 `ui` 组件中调整了文本样式,提升用户界面的可读性。 这些改进提升了消息处理的灵活性和用户体验,后续将继续优化相关功能。
- 在 `client.ts` 中新增 `archiveSession` 方法,支持归档会话。 - 在 `session-sidebar.tsx` 中添加删除按钮,允许用户删除会话并确认操作。 - 更新 `use-session-list.ts` 中的 `removeSession` 方法,处理会话删除逻辑并刷新会话列表。 - 在 `chat-page.tsx` 中实现会话删除后的处理逻辑,确保用户体验流畅。 这些改进增强了会话管理功能,提升了用户交互体验。
创建会话时在 Handler 冻结 workspace_id,Git 带 session_id 时用该目录;未设 DB_DSN 时 SQLite 写仓根 data/。 Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什么 / What changed
workspace_id。Git 带session_id时仓库根跟该目录,未带才回落GIT_REPO/ cwd。未设DB_DSN时 SQLite 写仓根data/。怎么验证 / How to verify
cd server && go test ./...pnpm test:clientworkspace_id为该绝对路径;不选则回落GIT_REPO/ cwd/git带当前会话时仓库根等于该目录;指定不存在的目录创建会话应 400相关 Issue / Related issue:#18